package Bug;

public class Bug {

	private int position;
	private boolean direction;
	
	public Bug(int initialPosition)
	{
		position = initialPosition;
		direction = true;
	}
	
	public void turn()
	{
		direction = !direction;
	}
	
	public void move()
	{
		if(direction == true)
		{
			position = position + 1;
		}
		else
		{
			position = position - 1;
		}
	}
	
	public int getPosition()
	{
		System.out.println(position);
		return position;
	}
	
	public void getDirection()
	{
		System.out.println(direction);
	}
}
